package File;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

//文件操作OutputStream(字节流)
public class Demo10 {
    public static void main(String[] args) throws IOException {
        try(OutputStream outputStream = new FileOutputStream("./src/test.txt",true)){
//            byte[] b = {1,2,3,4};
            outputStream.write('A');
            outputStream.write('B');
            outputStream.write('C');

            //将缓存遗留的数据刷新到文件中
            outputStream.flush();
        }
    }
}
